package com.wzy.oa_sys.controller.report;

import com.wzy.oa_sys.model.response.report.PerformanceResp;
import com.wzy.oa_sys.model.response.report.TaskRateResp;
import com.wzy.oa_sys.model.response.report.UseSituationResp;
import com.wzy.oa_sys.model.response.report.WorkTimeResp;
import com.wzy.oa_sys.service.report.RePortService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RestController
@RequestMapping("/report")
public class ReportController {
    @Autowired
    private RePortService reportService;

    //获取工作时间
    @GetMapping("/getWorkTime")
    public List<WorkTimeResp> getWorkTime(HttpServletRequest request) {
        return reportService.getWorkTime(request);
    }

    //获取任务完成率
    @GetMapping("/getTaskRate")
    public List<TaskRateResp> getTaskRate(HttpServletRequest request) {
        return reportService.getTaskRate(request);
    }

    //获取绩效
    @GetMapping("/getPerformance")
    public List<PerformanceResp> getPerformance(HttpServletRequest request) {
        return reportService.getPerformance(request);
    }

    //获取每个模块的使用情况
    @GetMapping("/getUseSituation")
    public List<UseSituationResp> getUseSituation() {
        return reportService.getUseSituation();
    }

}
